<%--
  Created by IntelliJ IDEA.
  User: hongcy
  Date: 16-3-20
  Time: 下午9:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ include file="/include/taglib.jsp" %>
<div style="padding:20px 0px;">
    <form method="post" action="${ctx}/mulanweb/admin/city/save" id="ff">
        <table cellspacing="5" style="margin: 0 auto">
            <tr>
                <td>名称:</td>
                <td><input type="text" name="cityName" class="easyui-textbox"
                           data-options="required:true,validType:{length:[1,15]}" style="width: 200px;" value="${param.name}"/></td>
            </tr>
            <tr>
                <td>排序:</td>
                <td><input type="text" name="sequence" class="easyui-numberbox"
                           data-options="required:true" style="width: 200px;" value="${param.sequence}"/></td>
            </tr>
            <input type="hidden" name="cityId" id="cityId" value="${param.cityId}"/>
        </table>
    </form>
</div>
<script>
    $(function(){
        var cityId = $("#cityId").val();
        if(cityId){
            $("#ff").attr("action","${ctx}/mulanweb/admin/city/update");
        }
    })
</script>
